<template>
  <div :style="{height: tableHeight+'px'}" class="timeline-box">
    <el-timeline>
      <el-timeline-item :timestamp="resumeDetail.employ_time" placement="top" :color="color">
        <el-card>
          <h4>录用</h4>
        </el-card>
      </el-timeline-item>
      <el-timeline-item :timestamp="resumeDetail.employ_time" placement="top" :color="color">
        <el-card>
          <h4>录用审核</h4>
          <p class="timeline-content">试用考核通过，录用考核/会签人：{{resumeDetail.assessment_user}}</p>
          <p><span class="timeline-content-check" @click="checkDetail(2)">查看录用审核详情</span></p>
        </el-card>
      </el-timeline-item>
      <el-timeline-item :timestamp="resumeDetail.trail_time" placement="top" :color="color">
        <el-card>
          <h4>面试审核</h4>
          <p class="timeline-content">面试通过，录用考核/会签人：{{resumeDetail.interview_user}}</p>
          <p><span class="timeline-content-check" @click="checkDetail(1)">查看面试审核详情</span></p>
        </el-card>
      </el-timeline-item>
      <el-timeline-item :timestamp="resumeDetail.examine_time" placement="top" :color="color">
        <el-card>
          <h4>简历审核预约面试</h4>
          <p class="timeline-content">简历审核通过，简历审核/面试约见人：{{ resumeDetail.examineuser.realname }}，预约面试时间： {{ resumeDetail.recruit_time }}</p>
        </el-card>
      </el-timeline-item>
      <el-timeline-item :timestamp="resumeDetail.create_time" placement="top" :color="color">
        <el-card>
          <h4>收入简历</h4>
        </el-card>
      </el-timeline-item>
    </el-timeline>
  </div>
</template>

<script>
export default {
  props: ['resumeDetail', 'tableHeight'],
  name: "Timeline",
  data() {
    return {
      color: '#069f71'
    }
  },
  created() {
    // console.log(99999, this.resumeDetail)
  },
  methods: {
    // 初始化
    async InitFn() {
      // let data = await this.$fetch(this.api.archives.edit, {id: this.userID});
      // console.log('data:', data)
      // this.employeeFles = this.getJson(data.vo)
    },
    // 关闭弹窗
    closePOpup() {
      this.$emit('update:visible', false)
    },
    getJson(option) {
      return JSON.parse(JSON.stringify(option))
    },
    checkDetail(option) {
      console.log('查看简历审核详情');
      // this. @click="showPreview(2)"
      this.$emit('getDetailLine',option)
    }
  },
}
</script>

<style scoped>
.timeline-content {
  margin-top: 10px;
}

.timeline-content-check {
  color: #1b8de5;
  text-decoration: underline;
  cursor: pointer;
}
.timeline-box{
  overflow-y: auto;
}
</style>
